import request from "./request"

// 获取景点经纬度
export function getAllJournery () {
  return request({
    method: 'GET',
    url: '/address/selectAllJourney'
  })
}

// 获取景点详情数据
export function getScenicDetail (scenicName) {
  return request({
    method: 'GET',
    url: '/scenic/scenicAddress',
    params: { scenicName }
  })
}

// 获取城市省份数据
export function getCityInf (cityName) {
  return request({
    method: 'GET',
    url: '/city/cityAddress',
    params: { cityName }
  })
}

// 生成路线
export function addScenicRoute (routeInf) {
  return request({
    method: 'POST',
    url: '/route/addScenicRoute',
    data: routeInf 
  })
}

// 获取路线
export function getScenicRoute (pageNum,pageSize,userId) {
  return request({
    method: 'GET',
    url: '/route/selectRouteById',
    params: {pageNum,pageSize,userId} 
  })
}

// 删除路线
export function deleteRoute (id) {
  return request({
    method: 'GET',
    url: '/route/deleteRouteById',
    params: {id} 
  })
}


